﻿using System.Collections.Generic;
using System.Linq;
using Melee.DataContract.Views;
using Melee.Models.Entity;

namespace Melee.DataContract.Extension
{
    public static class PointExtension
    {
        public static PointView ConvertToPointView(this Point point)
        {
            return new PointView
            {
                Id = point.Id.ToString()
            };
        }

        public static IEnumerable<PointView> ConvertToPointView(this IEnumerable<Point> points)
        {
            return points.Select(p => new PointView
            {
                Id = p.Id.ToString()
            });
        }
    }
}
